import request from "@/utils/request";

// 查询物料退货列表
export function listMaterialreject(query) {
  return request({
    url: "/mes/materialreject/list",
    method: "get",
    params: query,
  });
}

// 查询物料退货详细
export function getMaterialreject(id) {
  return request({
    url: "/mes/materialreject/" + id,
    method: "get",
  });
}

// 新增物料退货
export function addMaterialreject(data) {
  return request({
    url: "/mes/materialreject",
    method: "post",
    data: data,
  });
}

// 修改物料退货
export function updateMaterialreject(data) {
  return request({
    url: "/mes/materialreject",
    method: "put",
    data: data,
  });
}

// 删除物料退货
export function delMaterialreject(id) {
  return request({
    url: "/mes/materialreject/" + id,
    method: "delete",
  });
}

// 查询物料退货明细列表
export function detailMaterialreject(query) {
  return request({
    url: "/mes/materialreject/detail",
    method: "get",
    params: query,
  });
}
